package API.DAY4.collection;

import java.util.Arrays;
import java.util.List;

public class ArrayToList {
    public static void main(String[] args) {
        String[] arr = {"a", "b", "c", "d"};
        System.out.println(Arrays.toString(arr));

        List<String> list = Arrays.asList(arr);
        System.out.println(list);

        arr[1]="z";
        System.out.println(Arrays.toString(arr));
        System.out.println(list);

        list.set(2,"x");
        System.out.println(Arrays.toString(arr));
        System.out.println(list);


    }
}
